package o;

import com.huawei.appgallery.festivalanimation.particle.modifiers.SizeModifier;

public class fzt {
    static final /* synthetic */ boolean ˊˊ = (!fzt.class.desiredAssertionStatus());
    public final fzr ʻ = new fzr();
    public float ʻॱ;
    public final fzp ʼ = new fzp();
    public float ʼॱ;
    public final fzp ʽ = new fzp();
    public float ʽॱ;
    public float ʾ;
    public float ʿ;
    public float ˈ;
    private final fzn ˉ = new fzn();
    public fzs ˊ;
    private final fzb ˊˋ = new fzb();
    public gac ˊॱ;
    private final fzy ˊᐝ = new fzy();
    public final fzn ˋ = new fzn();
    public Object ˋˊ;
    public gab ˋॱ;
    public int ˎ;
    public int ˏ;
    public int ˏॱ;
    public fzt ͺ;
    public final fzn ॱ = new fzn();
    public fzt ॱˊ;
    public gaj ॱˋ;
    public float ॱˎ;
    public float ॱॱ = 0.0f;
    public float ॱᐝ;
    public float ᐝ = 0.0f;
    public gax ᐝॱ;

    public fzt(fzw o_fzw, gac o_gac) {
        if (!ˊˊ && !o_fzw.ˎ.ʻ()) {
            throw new AssertionError();
        } else if (!ˊˊ && !o_fzw.ˊ.ʻ()) {
            throw new AssertionError();
        } else if (!ˊˊ && o_fzw.ˏॱ < 0.0f) {
            throw new AssertionError();
        } else if (!ˊˊ && o_fzw.ʼ < 0.0f) {
            throw new AssertionError();
        } else if (ˊˊ || o_fzw.ʽ >= 0.0f) {
            this.ˏ = 0;
            if (o_fzw.ˋॱ) {
                this.ˏ |= 8;
            }
            if (o_fzw.ͺ) {
                this.ˏ |= 16;
            }
            if (o_fzw.ᐝ) {
                this.ˏ |= 4;
            }
            if (o_fzw.ॱॱ) {
                this.ˏ |= 2;
            }
            if (o_fzw.ˊॱ) {
                this.ˏ |= 32;
            }
            this.ˊॱ = o_gac;
            this.ˋ.ˊ.ॱ(o_fzw.ˎ);
            this.ˋ.ˏ.ˋ(o_fzw.ˏ);
            this.ʻ.ˊ.ˊ();
            this.ʻ.ˏ.ॱ(this.ˋ.ˊ);
            this.ʻ.ˋ.ॱ(this.ˋ.ˊ);
            this.ʻ.ˎ = o_fzw.ˏ;
            this.ʻ.ॱ = o_fzw.ˏ;
            this.ʻ.ॱॱ = 0.0f;
            this.ᐝॱ = null;
            this.ॱˋ = null;
            this.ͺ = null;
            this.ॱˊ = null;
            this.ʽ.ॱ(o_fzw.ˊ);
            this.ॱॱ = o_fzw.ʻ;
            this.ʿ = o_fzw.ʽ;
            this.ˈ = o_fzw.ʼ;
            this.ʾ = o_fzw.ˏॱ;
            this.ʼ.ˊ();
            this.ᐝ = 0.0f;
            this.ʼॱ = 0.0f;
            this.ˊ = o_fzw.ॱ;
            if (this.ˊ == fzs.DYNAMIC) {
                this.ॱˎ = 1.0f;
                this.ॱᐝ = 1.0f;
            } else {
                this.ॱˎ = 0.0f;
                this.ॱᐝ = 0.0f;
            }
            this.ʻॱ = 0.0f;
            this.ʽॱ = 0.0f;
            this.ˋˊ = o_fzw.ˋ;
            this.ˋॱ = null;
            this.ˏॱ = 0;
        } else {
            throw new AssertionError();
        }
    }

    public final gab ˋ(fzy o_fzy) {
        if (!ˊˊ && this.ˊॱ.ˊ()) {
            throw new AssertionError();
        } else if (this.ˊॱ.ˊ()) {
            return null;
        } else {
            gab o_gab = new gab();
            o_gab.ˏ(this, o_fzy);
            if ((this.ˏ & 32) == 32) {
                o_gab.ˏ(this.ˊॱ.ˋ.ˊ, this.ˋ);
            }
            o_gab.ˋ = this.ˋॱ;
            this.ˋॱ = o_gab;
            this.ˏॱ++;
            o_gab.ˏ = this;
            if (o_gab.ˎ > 0.0f) {
                ॱॱ();
            }
            gac o_gac = this.ˊॱ;
            o_gac.ˊ |= 1;
            return o_gab;
        }
    }

    public final fzn ˏ() {
        return this.ˋ;
    }

    public final fzp ˎ() {
        return this.ˋ.ˊ;
    }

    public final float ˋ() {
        return this.ʻ.ॱ;
    }

    public final void ˏ(fzp o_fzp) {
        if (this.ˊ != fzs.STATIC) {
            if (fzp.ˎ(o_fzp, o_fzp) > 0.0f) {
                ˏ(true);
            }
            this.ʽ.ॱ(o_fzp);
        }
    }

    public final fzp ˊ() {
        return this.ʽ;
    }

    public final float ॱ() {
        return this.ॱॱ;
    }

    public void ॱ(float f) {
        if (this.ˊ == fzs.DYNAMIC) {
            if (!ʼ()) {
                ˏ(true);
            }
            this.ॱॱ += this.ʽॱ * f;
        }
    }

    public final float ʻ() {
        return this.ʻॱ + (this.ॱˎ * ((this.ʻ.ˊ.ˊ * this.ʻ.ˊ.ˊ) + (this.ʻ.ˊ.ॱ * this.ʻ.ˊ.ॱ)));
    }

    public final void ॱॱ() {
        this.ॱˎ = 0.0f;
        this.ॱᐝ = 0.0f;
        this.ʻॱ = 0.0f;
        this.ʽॱ = 0.0f;
        this.ʻ.ˊ.ˊ();
        if (this.ˊ == fzs.STATIC || this.ˊ == fzs.KINEMATIC) {
            this.ʻ.ˏ.ॱ(this.ˋ.ˊ);
            this.ʻ.ˋ.ॱ(this.ˋ.ˊ);
            this.ʻ.ˎ = this.ʻ.ॱ;
        } else if (ˊˊ || this.ˊ == fzs.DYNAMIC) {
            fzp ʽ = this.ˊॱ.ॱ().ʽ();
            ʽ.ˊ();
            fzp ʽ2 = this.ˊॱ.ॱ().ʽ();
            fzb o_fzb = this.ˊˋ;
            for (gab o_gab = this.ˋॱ; o_gab != null; o_gab = o_gab.ˋ) {
                if (o_gab.ˎ != 0.0f) {
                    o_gab.ˏ(o_fzb);
                    this.ॱˎ += o_fzb.ॱ;
                    ʽ2.ॱ(o_fzb.ˏ).ˊ(o_fzb.ॱ);
                    ʽ.ˏ(ʽ2);
                    this.ʻॱ += o_fzb.ˎ;
                }
            }
            if (this.ॱˎ > 0.0f) {
                this.ॱᐝ = 1.0f / this.ॱˎ;
                ʽ.ˊ(this.ॱᐝ);
            } else {
                this.ॱˎ = 1.0f;
                this.ॱᐝ = 1.0f;
            }
            if (this.ʻॱ <= 0.0f || (this.ˏ & 16) != 0) {
                this.ʻॱ = 0.0f;
                this.ʽॱ = 0.0f;
            } else {
                this.ʻॱ -= this.ॱˎ * fzp.ˎ(ʽ, ʽ);
                if (ˊˊ || this.ʻॱ > 0.0f) {
                    this.ʽॱ = 1.0f / this.ʻॱ;
                } else {
                    throw new AssertionError();
                }
            }
            fzp ʽ3 = this.ˊॱ.ॱ().ʽ();
            ʽ3.ॱ(this.ʻ.ˋ);
            this.ʻ.ˊ.ॱ(ʽ);
            fzn.ˏ(this.ˋ, this.ʻ.ˊ, this.ʻ.ˏ);
            this.ʻ.ˋ.ॱ(this.ʻ.ˏ);
            ʽ2.ॱ(this.ʻ.ˋ).ˎ(ʽ3);
            fzp.ˎ(this.ॱॱ, ʽ2, ʽ3);
            this.ʽ.ˏ(ʽ3);
            this.ˊॱ.ॱ().ˋ(3);
        } else {
            throw new AssertionError();
        }
    }

    public fzs ʽ() {
        return this.ˊ;
    }

    public final boolean ᐝ() {
        return (this.ˏ & 8) == 8;
    }

    public void ˏ(boolean z) {
        if (!z) {
            this.ˏ &= -3;
            this.ʼॱ = 0.0f;
            this.ʽ.ˊ();
            this.ॱॱ = 0.0f;
            this.ʼ.ˊ();
            this.ᐝ = 0.0f;
        } else if ((this.ˏ & 2) == 0) {
            this.ˏ |= 2;
            this.ʼॱ = 0.0f;
        }
    }

    public boolean ʼ() {
        return (this.ˏ & 2) == 2;
    }

    public void ॱ(boolean z) {
        if (!ˊˊ && this.ˊॱ.ˊ()) {
            throw new AssertionError();
        } else if (z != ˊॱ()) {
            fyw o_fyw;
            gab o_gab;
            if (z) {
                this.ˏ |= 32;
                o_fyw = this.ˊॱ.ˋ.ˊ;
                for (o_gab = this.ˋॱ; o_gab != null; o_gab = o_gab.ˋ) {
                    o_gab.ˏ(o_fyw, this.ˋ);
                }
                return;
            }
            this.ˏ &= -33;
            o_fyw = this.ˊॱ.ˋ.ˊ;
            for (o_gab = this.ˋॱ; o_gab != null; o_gab = o_gab.ˋ) {
                o_gab.ˎ(o_fyw);
            }
            gaj o_gaj = this.ॱˋ;
            while (o_gaj != null) {
                gaj o_gaj2 = o_gaj.ˊ;
                this.ˊॱ.ˋ.ˎ(o_gaj.ॱ);
                o_gaj = o_gaj2;
            }
            this.ॱˋ = null;
        }
    }

    public boolean ˊॱ() {
        return (this.ˏ & 32) == 32;
    }

    public final gaj ͺ() {
        return this.ॱˋ;
    }

    public final fzt ˏॱ() {
        return this.ॱˊ;
    }

    protected final void ॱˊ() {
        fzn o_fzn = this.ˉ;
        o_fzn.ˏ.ˏ = fzm.ˋ(this.ʻ.ˎ);
        o_fzn.ˏ.ˊ = fzm.ˎ(this.ʻ.ˎ);
        o_fzn.ˊ.ˊ = (this.ʻ.ˏ.ˊ - (o_fzn.ˏ.ˊ * this.ʻ.ˊ.ˊ)) + (o_fzn.ˏ.ˏ * this.ʻ.ˊ.ॱ);
        o_fzn.ˊ.ॱ = (this.ʻ.ˏ.ॱ - (o_fzn.ˏ.ˏ * this.ʻ.ˊ.ˊ)) - (o_fzn.ˏ.ˊ * this.ʻ.ˊ.ॱ);
        for (gab o_gab = this.ˋॱ; o_gab != null; o_gab = o_gab.ˋ) {
            o_gab.ˎ(this.ˊॱ.ˋ.ˊ, o_fzn, this.ˋ);
        }
    }

    public final void ˋॱ() {
        this.ˋ.ˏ.ˏ = fzm.ˋ(this.ʻ.ॱ);
        this.ˋ.ˏ.ˊ = fzm.ˎ(this.ʻ.ॱ);
        fzi o_fzi = this.ˋ.ˏ;
        fzp o_fzp = this.ʻ.ˊ;
        this.ˋ.ˊ.ˊ = (this.ʻ.ˋ.ˊ - (o_fzi.ˊ * o_fzp.ˊ)) + (o_fzi.ˏ * o_fzp.ॱ);
        this.ˋ.ˊ.ॱ = (this.ʻ.ˋ.ॱ - (o_fzi.ˏ * o_fzp.ˊ)) - (o_fzi.ˊ * o_fzp.ॱ);
    }

    public boolean ˋ(fzt o_fzt) {
        if (this.ˊ != fzs.DYNAMIC && o_fzt.ˊ != fzs.DYNAMIC) {
            return false;
        }
        gax o_gax = this.ᐝॱ;
        while (o_gax != null) {
            if (o_gax.ˎ == o_fzt && !o_gax.ॱ.ˋ()) {
                return false;
            }
            o_gax = o_gax.ˊ;
        }
        return true;
    }

    protected final void ˋ(float f) {
        this.ʻ.ˋ(f);
        this.ʻ.ˋ.ॱ(this.ʻ.ˏ);
        this.ʻ.ॱ = this.ʻ.ˎ;
        this.ˋ.ˏ.ˋ(this.ʻ.ॱ);
        fzi.ॱ(this.ˋ.ˏ, this.ʻ.ˊ, this.ˋ.ˊ);
        this.ˋ.ˊ.ˊ(SizeModifier.STABLE_STATE_SCALE).ˏ(this.ʻ.ˋ);
    }
}
